#pragma once

#define MAX_PLAYER_NAME          12                         // max allowed by client name length
#define MAX_INTERNAL_PLAYER_NAME 15                         // max server internal player name length ( > MAX_PLAYER_NAME for support declined names )
#define MAX_PET_NAME             12                         // max allowed by client name length
#define MAX_CHARTER_NAME         24                         // max allowed by client name length

struct CellObjectGuids
{
    std::set<unsigned int> creatures;
    std::set<unsigned> gameobjects;
    std::map<unsigned int, unsigned int> corpses;
};

class ObjectMgr : public cftf::util::Singleton<ObjectMgr>
{
    friend class cftf::util::Singleton<ObjectMgr>;
private:
    ObjectMgr();

public:

    unsigned int GetFirstTemporaryCreatureLowGuid() const
    {
        return m_FirstTemporaryCreatureGuid;
    }

    unsigned int GetFirstTemporaryGameObjectLowGuid() const
    {
        return m_FirstTemporaryGameObjectGuid;
    }

    void AddCreatureToGrid(unsigned int guid, mt::CreatureData const* data);

private:
    unsigned int m_FirstTemporaryCreatureGuid = 0;
    unsigned int m_FirstTemporaryGameObjectGuid = 0;
    std::unordered_map<unsigned int, std::unordered_map<unsigned int, CellObjectGuids>> mMapObjectGuids;
};